<?php

namespace App\Services;

use Firebase\JWT\JWT;
use Firebase\JWT\Key;

class JwtToken
{
    public static function createToken($id){
        $key = 'month';
        $payload = [
            'iss' => 'http://example.org',
            'aud' => 'http://example.com',
            'iat' => 1356999524,
            'nbf' => 1357000000,
            'id'=>$id
        ];
        $jwt = JWT::encode($payload, $key, 'HS256');
        return $jwt;
    }

}
